﻿#region << 文 件 说 明 >>

/*----------------------------------------------------------------
// 文件名称：Logger
// 创 建 者：杨程
// 创建时间：2021/9/10 14:06:46
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//
//
//----------------------------------------------------------------*/

#endregion

namespace Vampirewal.Core.Models;

/// <summary>
/// 日志模型
/// </summary>
[SugarTable("Vampirewal_Log","默认日志")]
public class Logger : BillBaseModel
{
    /// <summary>
    /// 日志类型
    /// </summary>
    [SugarColumn(ColumnName ="Type",ColumnDescription = "日志类型")]
    public LoggerType Type { get; set; }

    /// <summary>
    /// 来自哪个模块
    /// </summary>
    [SugarColumn(ColumnName = "SystemMoudleName", ColumnDescription = "来自哪个模块")]
    public string SystemMoudleName { get; set; }

    /// <summary>
    /// 日志内容
    /// </summary>
    [SugarColumn(Length = 2000, ColumnName = "Content", ColumnDescription = "日志内容")]
    public string Content { get; set; }
}

/// <summary>
/// 日志类型
/// </summary>
public enum LoggerType
{
    /// <summary>
    /// 任意操作
    /// </summary>
    Debug = 0,

    /// <summary>
    /// 警告
    /// </summary>
    Warning = 1,

    /// <summary>
    /// 错误
    /// </summary>
    Error = 2,

    /// <summary>
    /// 数据库操作
    /// </summary>
    SQL = 3
}